package com.example.chatchatbackend.entity.dto.send;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author 丁真
 * @since 2024-10-28 05:03:47
 */
@Data
@AllArgsConstructor
@NoArgsConstructor

@TableName("db_sendadv")
public class SendAdv implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 广告标题
     */
    private String title;

    /**
     * 广告内容
     */
    private String content;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime createdTime;

    /**
     * 图片
     */
    private String imageUrl;

    /**
     * 发送时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime sendTime;

    /**
     * 修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime updateTime;

    /**
     * 结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime endTime;

    /**
     * 0未发送，1已发送
     */
    private String isSend;
    private Integer creatorId;
    private String creatorName;


    public SendAdv(Integer id, String title, String content, LocalDateTime createdTime, String imageUrl, LocalDateTime sendTime, LocalDateTime updateTime, LocalDateTime endTime, String isSend, Integer creatorId) {
        this.id = id; // 赋值 id
        this.title = title; // 赋值 title
        this.content = content; // 赋值 content
        this.createdTime = createdTime; // 赋值 createdTime
        this.imageUrl = imageUrl; // 赋值 imageUrl
        this.sendTime = sendTime; // 赋值 sendTime
        this.updateTime = updateTime; // 赋值 updateTime
        this.endTime = endTime; // 赋值 endTime
        this.isSend = isSend; // 赋值 isSend
        this.creatorId = creatorId; // 赋值 creatorId
    }

}
